package mvcc

import (
	"sync"
)

var TrId *int64
var RowReadView *sync.Map
var Data map[int64]IRow // 测试用，不需要构建Btree

type TrList struct {
	M *sync.Map
}

var LockIdsMap *sync.Map

func init() {
	Data = make(map[int64]IRow)
	RowReadView = new(sync.Map)
	LockIdsMap = new(sync.Map)
	TrId = new(int64)
	*TrId = 1
}

func (Trl *TrList) Has(id int64) bool {

	if _, ok := Trl.M.Load(id); ok {
		return true
	}
	return false
}

func (Trl TrList) Get(id int64, version int) interface{} {
	if Trl.Has(id) {

	}
	return nil
}
